<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>libnetconf: Compilation and Installation</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../libnetconf-logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">libnetconf
   &#160;<span id="projectnumber">0.10.0-146_trunk</span>
   </div>
   <div id="projectbrief">NETCONF Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="../../pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="../../modules.html"><span>Modules</span></a></li>
      <li><a href="../../annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('d9/d87/install.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Compilation and Installation </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1><a class="anchor" id="install-getting"></a>
Cloning git repository</h1>
<p>As written on libnetconf's <a href="https://code.google.com/p/libnetconf/source/checkout">Google Code page</a>, the repository can be cloned using the following command:</p>
<div class="fragment"><div class="line">$ git clone https:<span class="comment">//code.google.com/p/libnetconf/</span></div>
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>In case that git fails to clone the repository make sure your git is at least version 1.6.6.</dd></dl>
<h1><a class="anchor" id="install-reqs"></a>
Requirements</h1>
<p>Before compiling the source code make sure that your system provides the following libraries or applications. Some of them are optional or can be avoided in cost of missing of some feature - see the notes for the specific item. All requirements are checked by the <code>configure</code> script.</p>
<ul>
<li>compiler (<em>gcc</em>, <em>clang</em>, ...) and standard headers</li>
<li><em>pkg-config</em></li>
<li><em>libpthreads</em></li>
<li><em>libxml2</em> (including headers from the devel package)</li>
<li><em>libxslt</em> (including headers from the devel package)</li>
<li><em>libssh</em> (including headers from the devel package)<ul>
<li>can be omitted by <code>--disable-libssh</code> option, but in that case a standalone SSH client (usually from the openSSH) is required. For more details, see <a class="el" href="../../d9/d87/install.html#configure-disable-libssh">--disable-libssh</a> description.</li>
</ul>
</li>
<li><em>libcurl</em> (including headers from the devel package)<ul>
<li>can be omitted by <code>--disable-url</code> option, but in that case the NETCONF :url capability is disabled.</li>
</ul>
</li>
<li><em>libopenssl</em> (including headers from the devel package)<ul>
<li>required only when the TLS transport is enabled by <code>--enable-tls</code> option. More information about the TLS transport can be found in <a class="el" href="../../d4/d76/transport.html">Transport Protocol</a> section.</li>
</ul>
</li>
<li><em>doxygen</em><ul>
<li>optional, required to (re)build documentation (<code>make doc</code>)</li>
</ul>
</li>
<li><em>rpmbuild</em><ul>
<li>optional, required to build RPM package (<code>make rpm</code>)</li>
</ul>
</li>
</ul>
<h1><a class="anchor" id="install-compilation"></a>
Compilation</h1>
<p>libnetconf uses standard GNU Autotools toolchain. To compile and install libnetconf you have to go through the following three steps:</p>
<div class="fragment"><div class="line">$ ./configure</div>
<div class="line">$ make</div>
<div class="line"><span class="preprocessor"># make install</span></div>
</div><!-- fragment --><p>This way the library will be installed in <code>/usr/local/lib/</code> (or lib64) and <code>/usr/local/include/</code> respectively.</p>
<h2><a class="anchor" id="install-compilation-options"></a>
Configure Options</h2>
<p><code>configure</code> script supports the following options. The full list of the accepted options can be shown by <code>--help</code> option.</p>
<ul>
<li><code>--disable-libssh</code><a class="anchor" id="configure-disable-libssh"></a><ul>
<li>Remove dependency on the <code>libssh</code> library. By default, the <code>libssh</code> library is used by the client side functions to create SSH connection to a remote host. If the usage of the <code>libssh</code> is disabled, libnetconf will use a standalone <code>ssh(1)</code> client located in a system path. <code>ssh(1)</code> client is, for example, part of the OpenSSH. This option has no effect for server-side functionality.</li>
</ul>
</li>
<li><code>--disable-notifications</code><ul>
<li>Remove support for the NETCONF Notifications.</li>
</ul>
</li>
<li><code>--disable-url</code><ul>
<li>Remove support for NETCONF :url capability. cURL dependency is also removed.</li>
</ul>
</li>
<li><code>--disable-validation</code><ul>
<li>Remove support for NETCONF :validate capability.</li>
</ul>
</li>
<li><code>--disable-yang-schemas</code><ul>
<li>Remove support for YANG data model format for &lt;get-schema&gt; opration. With this option, only YIN format is available.</li>
</ul>
</li>
<li><code>--enable-debug</code><ul>
<li>Add debugging information for a debugger.</li>
</ul>
</li>
<li><code>--enable-tls</code><ul>
<li>Enable experimental support for TLS transport. More information about the TLS transport can be found in <a class="el" href="../../d4/d76/transport.html">Transport Protocol</a> section.</li>
</ul>
</li>
<li><code>--with-pyapi[=path_to_python3]</code><ul>
<li>Build also the libnetconf Python API. This requires python3, so if it is installed in some non-standard location, specify the complete path to the binary. For more information about Python API, see a separated doxygen documentation accessible from the project main page.</li>
</ul>
</li>
<li><code>--with-nacm-recovery-uid=&lt;uid&gt;</code><a class="anchor" id="configure-nacm-recovery"></a><ul>
<li>Specify user ID to be used for the identification of the <a class="el" href="../../dd/d59/nacm.html#nacm-recovery">NACM Recovery Session</a>.</li>
</ul>
</li>
<li><code>--with-workingdir=&lt;path&gt;</code><ul>
<li>Change location of libnetconf's working directory. Default path is <code>/var/lib/libnetconf/</code>. Note that applications using libnetconf should have permissions to read/write to this path, with <code>--with-suid</code> and <code>--with-sgid</code> this is set automatically.</li>
</ul>
</li>
<li><code>--with-suid=&lt;user&gt;</code><ul>
<li>Limit usage of libnetconf to the specific <em>user</em>. With this option, libnetconf creates shared files and other resources with access rights limited to the specified <em>user</em>. This option can be freely combined with the <code>--with-sgid</code> option. If neither <code>--with-suid</code> nor <code>--with-sgid</code> option is specified, full access rights for all users are granted.</li>
</ul>
</li>
<li><code>--with-sgid=&lt;group&gt;</code><ul>
<li>Limit usage of libnetconf to the specific <em>group</em>. With this option, libnetconf creates shared files and other resources with access rights limited to the specified <em>group</em>. This option can be freely combined with the <code>--with-suid</code> option. If neither <code>--with-suid</code> nor <code>--with-sgid</code> option is specified, full access rights for all users are granted.</li>
</ul>
</li>
</ul>
<dl class="section note"><dt>Note</dt><dd>If the library is built with <code>--with-suid</code> or <code>--with-sgid</code> options, the proper suid or/and sgid bit should be set to the server-side application binaries that use the libnetconf library. </dd></dl>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Fri Apr 15 2016 09:20:09 for libnetconf by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
